<?php
use mdm\admin\components\MenuHelper;

$callback = function ($menu) {
    $data = json_decode($menu['data'], true);
    $items = $menu['children'];
    $return = [
        'label' => $menu['name'],
        'url' => [$menu['route']],
    ];

    if ($data) {
        //visible
        isset($data['visible']) && $return['visible'] = $data['visible'];
        //icon
        isset($data['icon']) && $data['icon']
        && $return['icon'] = $data['icon'];
        //other attribute e.g. class...
        $return['options'] = $data;
    }

    (!isset($return['icon']) || !$return['icon'])
    && $return['icon'] = 'fa fa-circle-o';
    $items && $return['items'] = $items;

    return $return;
};
?>
<aside class="main-sidebar">

    <section class="sidebar">

        <!-- Sidebar user panel -->
<!--        <div class="user-panel">-->
<!--            <div class="pull-left image">-->
<!--                <img src="--><?//= $directoryAsset ?><!--/img/user2-160x160.jpg" class="img-circle" alt="User Image"/>-->
<!--            </div>-->
<!--            <div class="pull-left info">-->
<!--                <p>Alexander Pierce</p>-->
<!---->
<!--                <a href="#"><i class="fa fa-circle text-success"></i> Online</a>-->
<!--            </div>-->
<!--        </div>-->

        <!-- search form -->
<!--        <form action="#" method="get" class="sidebar-form">-->
<!--            <div class="input-group">-->
<!--                <input type="text" name="q" class="form-control" placeholder="Search..."/>-->
<!--              <span class="input-group-btn">-->
<!--                <button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i>-->
<!--                </button>-->
<!--              </span>-->
<!--            </div>-->
<!--        </form>-->
        <!-- /.search form -->

        <ul class="sidebar-menu">
            <li><a href="/website/index"><i class="fa fa-file-word-o"></i> <span>站点</span></a></li>
<!--            <li class=""><a href="/category/index"><i class="fa fa-hourglass-half"></i> <span>分类</span></a></li>-->

        </ul>

    </section>

</aside>
